<template>
  <div>
    <template v-for="(item,index) in props.menuList" :key="index">
      <el-menu-item :index="item.name" v-if="!item.children" class=""
                    style="border-radius: 5px" @click="handleClick(item)">
        <span class="font-18 ml-4 text-hidden-one">{{ item.name }}</span>
      </el-menu-item>
      <el-sub-menu :index="item.name" v-else class="hasChild " style="border-radius: 5px;">
        <template #title>
          <span class="font-18 ml-4 text-hidden-one">{{ item.name }}</span>
        </template>
        <edit-tree-item :menuList="item.children"></edit-tree-item>
      </el-sub-menu>
    </template>
  </div>

</template>

<script setup lang="ts">
//组件
//接口


//api
import { tagType} from "@/api/management/type";
import {copy} from "@/utils/copy";
//data
let props = defineProps<{
  menuList: tagType[]
}>()
/*
函数
*/

/**************************接口函数**************************/


/**************************操作函数**************************/
const handleClick = async (item: tagType) => {
  copy(item.tag)
}
</script>

<script lang="ts">
export default {
  name: 'editTreeItem'
}
</script>
<style scoped lang="scss">


</style>

